package com.sooth.micro.field.table;

import com.dream.system.annotation.Column;
import com.dream.system.annotation.Id;
import com.dream.system.annotation.Table;
import lombok.Data;

import java.sql.Types;

/**
 * @Description: 实体字段
 * @Author: moxa
 * @Date: 2023-12-01 19:48:36
 */
@Data
@Table("micro_field")
public class MicroField {


    /**
     * id
     */
    @Id
    @Column(value = "id", jdbcType = Types.BIGINT)
    private Long id;

    /**
     * 租户编号
     */
    @Column(value = "tenant_id", jdbcType = Types.VARCHAR)
    private String tenantId;

    /**
     * 实体编号
     */
    @Column(value = "entity_id", jdbcType = Types.BIGINT)
    private Long entityId;

    /**
     * 字段名称
     */
    @Column(value = "field_name", jdbcType = Types.VARCHAR)
    private String fieldName;

    /**
     * 字段编码
     */
    @Column(value = "field_code", jdbcType = Types.VARCHAR)
    private String fieldCode;

    /**
     * 字段类型
     */
    @Column(value = "field_type", jdbcType = Types.VARCHAR)
    private String fieldType;

    /**
     * 是否主键（0：否，1：是）
     */
    @Column(value = "pk", jdbcType = Types.INTEGER)
    private Integer pk;

    /**
     * 导入导出（0：否，1：是）
     */
    @Column(value = "excel", jdbcType = Types.INTEGER)
    private Integer excel;

    /**
     * 是否必填（0：否，1：是）
     */
    @Column(value = "required", jdbcType = Types.INTEGER)
    private Integer required;

    /**
     * 默认值（新增）
     */
    @Column(value = "add_value", jdbcType = Types.VARCHAR)
    private String addValue;

    /**
     * 默认值（编辑）
     */
    @Column(value = "edit_value", jdbcType = Types.VARCHAR)
    private String editValue;

    /**
     * 字典类型
     */
    @Column(value = "dict_type", jdbcType = Types.VARCHAR)
    private String dictType;

    /**
     * 校验方式
     */
    @Column(value = "check_type", jdbcType = Types.VARCHAR)
    private String checkType;
}
